package ar.edu.uba.fi.jmit.monitorengine.mock;

import java.util.LinkedList;
import java.util.List;

import ar.edu.uba.fi.jmit.integrationcommons.Event;
import ar.edu.uba.fi.jmit.monitorengine.core.MonitorEngineSender;

public class MonitorEngineSenderMock implements MonitorEngineSender {
	
	private LinkedList<Event> sendedEvents;
	
	public MonitorEngineSenderMock() {
		super();
		sendedEvents = new LinkedList<Event>();
	}
	
	public void reset() {
		sendedEvents.clear();
	}

	@Override
	public void sendEvent(Event event) {
		sendedEvents.add(event);
	}

	public List<Event> getSendedEvents() {
		return sendedEvents;
	}
	
	public Event getLastSendedEvent() {
		return sendedEvents.getLast();
	}

}
